Class PKIService

java.lang.Object
com.netscape.cms.servlet.base.PKIService
Direct Known Subclasses:
AccountService, FeatureService, SecurityDomainService, SelfTestService, SubsystemService

public class PKIService extends Object
Base class for CMS RESTful resources
Author:
alee
  • Field Details

    • logger

      public static org.slf4j.Logger logger
    • DEFAULT_LONG_CACHE_LIFETIME

      public static final int DEFAULT_LONG_CACHE_LIFETIME
      See Also:
    • MESSAGE_FORMATS

      public static List<javax.ws.rs.core.MediaType> MESSAGE_FORMATS
    • MIN_FILTER_LENGTH

      public static final int MIN_FILTER_LENGTH
      See Also:
    • DEFAULT_SIZE

      public static final int DEFAULT_SIZE
      See Also:
    • uriInfo

      @Context protected javax.ws.rs.core.UriInfo uriInfo
    • headers

      @Context protected javax.ws.rs.core.HttpHeaders headers
    • request

      @Context protected javax.ws.rs.core.Request request
    • servletRequest

      @Context protected javax.servlet.http.HttpServletRequest servletRequest
    • servletContext

      @Context protected javax.servlet.ServletContext servletContext
  • Constructor Details

    • PKIService

      public PKIService()
  • Method Details

    • resolveFormat

      public static javax.ws.rs.core.MediaType resolveFormat(javax.ws.rs.core.MediaType format)
      Return a match for a candidate media type (which may be a wildcard) against the default list of valid media types.
      Returns:
      the matching MediaType or null if no match
    • resolveFormat

      public static javax.ws.rs.core.MediaType resolveFormat(javax.ws.rs.core.MediaType candidate, List<javax.ws.rs.core.MediaType> validTypes)
      Return a match for a candidate media type (which may be a wildcard) against a list of valid media types.
      Returns:
      the matching MediaType or null if no match
    • resolveFormat

      public static javax.ws.rs.core.MediaType resolveFormat(List<javax.ws.rs.core.MediaType> formats)
      Find a match from a list of candidate media types (which may be wildcards) against the default list of valid media types. Candidates are checked in list order. Quality values ("q" parameter) are ignored.
      Returns:
      the matching MediaType or null if no match
    • resolveFormat

      public static javax.ws.rs.core.MediaType resolveFormat(List<javax.ws.rs.core.MediaType> candidates, List<javax.ws.rs.core.MediaType> validTypes)
      Find a match from a list of candidate media types (which may be wildcards) against a list of valid media types. Candidates are checked in list order. Quality values ("q" parameter) are ignored.
      Returns:
      the matching MediaType or null if no match
    • getResponseFormat

      public static javax.ws.rs.core.MediaType getResponseFormat(javax.ws.rs.core.HttpHeaders headers)
    • getResponseFormat

      public javax.ws.rs.core.MediaType getResponseFormat()
    • createOKResponse

      public javax.ws.rs.core.Response createOKResponse()
    • marshall

      public Object marshall(Object response)
      Marshall response object with custom mapping if available. This method is called for by all services. It will use custom mapping if available.
    • unmarshall

      public <T> T unmarshall(Object request, Class<T> clazz)
      Unmarshall request object with custom mapping if available.
    • createOKResponse

      public javax.ws.rs.core.Response createOKResponse(Object entity)
    • createCreatedResponse

      public javax.ws.rs.core.Response createCreatedResponse(Object entity, URI link)
    • createNoContentResponse

      public javax.ws.rs.core.Response createNoContentResponse()
    • sendConditionalGetResponse

      public javax.ws.rs.core.Response sendConditionalGetResponse(int ctime, Object entity, javax.ws.rs.core.Request request)
    • getLocale

      public Locale getLocale(javax.ws.rs.core.HttpHeaders headers)
    • getParams

      public Map<String,String> getParams(Object object)
      Get the values of the fields annotated with @FormParam.
    • getCMSEngine

      public CMSEngine getCMSEngine()